﻿package {
	
	import flash.display.Shape;
	
	class Rectangle extends Shape {
		
		var X:int;
		var Y:int;
		var W:int;
		var H:int;
		
		public function Rectangle(a:int, b:int, c:int, d:int) {
			x = a; y = b; width = c; height = d;
		}
		public function setPos(a:int, b:int, w:int, h:int):void {
			//graphics.clear();
			X = a; Y = b; W = w; H = h;
			graphics.beginFill(0x000000);
			graphics.drawRect(X,Y,W,H);
			graphics.endFill();
		}
		
		public function clearRect():void {
			//graphics.clear();
		}
		
		public override function toString():String {
			var str:String = "Rectangle: [" + X + ", " + Y + "] [" + W + " x " + H + "]";
			return str;
		}
	}
}